<%@page contentType="text/html" pageEncoding="UTF-8"%>

<%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">

<%--
    This file is an entry point for JavaServer Faces application.
--%>
<f:view>
    <html>
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
            <title>Listar usuário</title>
        </head>
        <body>
            <h:form>
                <h:outputText value="Lista de usuários:"></h:outputText>
                <h:dataTable id="listaTodosUsuarios" value="#{UsuarioMB.lista2}" var="loc" border="1">
                    <h:column>
                        <f:facet name="header">
                            <h:outputText value="Nome"></h:outputText>
                        </f:facet>
                        <h:outputText value="#{loc.nome}"/>
                    </h:column>
                    <h:column>
                        <f:facet name="header">
                            <h:outputText value="Matricula"></h:outputText>
                        </f:facet>
                        <h:outputText value="#{loc.matricula}"/>
                    </h:column>
                    <h:column>
                        <f:facet name="header">
                            <h:outputText value="CPF"></h:outputText>
                        </f:facet>
                        <h:outputText value="#{loc.cpf}"/>
                    </h:column>
                    <h:column>
                        <h:commandButton value="Remover" action="#{UsuarioMB.remover}"></h:commandButton>
                        <h:commandButton value="Editar" action="#{UsuarioMB.prepararEdicao}"></h:commandButton>
                    </h:column>
                </h:dataTable>
            </h:form>
        </body>
    </html>
</f:view>
